using System;
using System.Collections.Generic;
using System.Windows.Forms;

using SBPweb.Modules.Modularity;

namespace SBPweb.Contracts.Options
{
	public interface IOptionsService : IService
	{
		/// <summary>
		/// Add new tab to the options window
		/// </summary>
		/// <param name="name">the name of the tab</param>
		/// <param name="text">the label of the tab</param>
		/// <param name="control">the whole control</param>
		void AddOptionsTab(string name, string text, Control control);
		/// <summary>
		/// Change the label of the tab
		/// </summary>
		/// <param name="name">the name of the tab</param>
		/// <param name="newText">the new label of the tab</param>
		void RenameOptionsTab(string name, string newText);
		/// <summary>
		/// Remove the tab from the options window
		/// </summary>
		/// <param name="name">the name of the tab</param>
		void RemoveOptionsTab(string name);

		/// <summary>
		/// Is something changed on a tab?
		/// </summary>
		bool IsModified
		{
			get;
			set;
		}

		/// <summary>
		/// Raises when something changed in a tab
		/// </summary>
		event EventHandler OnModify;
		/// <summary>
		/// Raises when the Apply or the Ok button clicked
		/// </summary>
		event EventHandler OnApply;
		/// <summary>
		/// Raises when the Cancel button clicked
		/// </summary>
		event EventHandler OnCancel;
	}
}
